package cn.jinjimi.domain.store;


import cn.jinjimi.app.custom.entity.ClueStatistic;
import cn.jinjimi.app.custom.entity.Custom;
import cn.jinjimi.app.custom.entity.CustomFollowsDTO;
import cn.jinjimi.app.custom.entity.CustomLastedFollow;
import cn.jinjimi.app.custom.entity.CustomListDTO;
import cn.jinjimi.app.custom.entity.CustomTagData;
import cn.jinjimi.app.custom.entity.Follow;
import cn.jinjimi.app.custom.entity.Insurance;
import cn.jinjimi.app.custom.entity.Proposal;
import cn.jinjimi.app.custom.entity.UploadCustom;
import cn.jinjimi.domain.data.dto.ClueDTO;
import cn.jinjimi.domain.data.dto.CustomImportDTO;
import cn.jinjimi.domain.data.dto.CustomerDto;
import cn.jinjimi.app.entity.PhotoInfo;

import java.io.IOException;
import java.util.List;

import retrofit2.Response;

/**
 * Created by zhenhua on 16/7/21.
 */
public interface CustomerStore {

    Response<CustomerDto> addCustomer(Custom customer, String clueId) throws IOException;

    Response<CustomerDto> updateCustomer(Custom customer) throws IOException;

    CustomImportDTO importContacts(List<UploadCustom> contacts) throws Exception;

    CustomerDto updateCustomerType(String id, int type) throws IOException;

    CustomListDTO getCustomers(long lastModified) throws IOException;

    Response<CustomerDto> getCustomer(String id) throws IOException;

    CustomerDto deleteCustomer(String customerId) throws IOException;

    boolean delFollow(String customerId, String id) throws IOException;

    boolean delFollowAttachments(String followId, String... ids) throws IOException;

    boolean delCustomerAttachment(String customerId, String attachmentId) throws IOException;

    Follow putFollow(String customerId, Follow follow) throws IOException;

    Follow newFollow(long customerId, String content, long time) throws IOException;

    CustomFollowsDTO getFollows(String customerId) throws IOException;

    Insurance getInsurance(String customerId, String insuranceId) throws IOException;

    List<Insurance> getInsuranceList(String customerId) throws IOException;

    Insurance deleteInsurance(String customerId, String insuranceId) throws IOException;

    Insurance addInsurance(String customerId, String name, long date, int term) throws IOException;

    Insurance updateInsurance(String customerId, long effect_date, long insureId, String name, int term) throws IOException;

    List<CustomTagData> getCustomerTag() throws IOException;

    List<PhotoInfo> getCustomerPhotosList(String customerId) throws IOException;

    String getRemindOfToday() throws IOException;

    ClueDTO getClues(int page, String source) throws IOException;

    ClueStatistic getClueStatic() throws IOException;

    List<CustomLastedFollow> getLastedFollowList(int page) throws IOException;

    List<Proposal> getProposalList(String customId, int page) throws IOException;

    Custom transferCustom(String clueId, String customId) throws IOException;
}
